import request from '@/utils/request'

const apiName = '/admin/hosp/hospitalSet'

export default {
  // 查询医院设置分页数据
  getPageList(current, limit, queryObj) {
    return request({
      url: `${apiName}/findPage/${current}/${limit}`,
      method: 'post',
      data: queryObj
    })
  },

  //删除医院设置
  deleteHospSet(id) {
    return request ({
      url: `${apiName}/${id}`,
      method: 'delete'
    })
  },

  //批量删除医院设置
  batchRemoveHospSet(idList) {
    return request ({
      url: `${apiName}/batchRemove`,
      method: 'delete',
      data: idList
    })
  },

  //锁定和取消锁定
  lockHospSet(id,status) {
    return request ({
      url: `${apiName}/lockHospitalSet/${id}/${status}`,
      method: 'put'
    })
  },

  //添加医院设置
  saveHospSet(hospitalSet) {
    return request ({
      url: `${apiName}/saveHospitalSet`,
      method: 'post',
      data: hospitalSet
    })
  },

  // 根据医院设置id查询
  getHospSet(id) {
    return request ({
      url: `${apiName}/getHospitalSet/${id}`,
      method: 'get'
    })
  },

  // 修改医院设置
  updateHospSet(hospitalSet) {
    return request ({
      url: `${apiName}/updateHospitalSet`,
      method: 'post',
      data: hospitalSet
    })
  }
}
